import request from '@/utils/request'
//添加评论
export function addCommentApi(comment){
   return request({
    method:'post',
    url:'/comment/add',
    data: comment
   })
}
//查找用户的分页评论数据
export function selectUserCommentApi(userId,page){
    // 
   return request({
    method:'get',
    url:'/comment/find',
    params: {
      "userId":userId,
      "page":page
   },
   })
}
//查找所有分页评论数据
export function selectAllCommentApi(page){
    // 
   return request({
    method:'get',
    url:'/comment/find/all',
    data: page,
   })
}
//查找帖子的分页评论数据
export function selectArticleCommentApi(postId,page){
   return request({
    method:'get',
    url:'/comment/find/post',
    params:{
        "postId":postId,
        "page":page
    }
   })
}
//删除评论
export function delCommentApi(commentId){
    return request({
    method:'delete',
    url:'/comment/delete',
    params:{
      "commentId":commentId
    }
   })
}